#include "accessLog.h"

AccessLog* AccessLog::instance = NULL;

/*
    Is singleton
    Gives a possibility to log all requests to server
*/
AccessLog::AccessLog() {
    // private constructor
}

void AccessLog::init(QString fileName) {
    if (instance == NULL) {
        instance = new AccessLog();
        instance->fileName = fileName;
    }
    // @todo open file as "a+"
}

void AccessLog::append(QString message /*, other params */) {
    if (instance->fileName != NULL) {
        // @todo write to file
        qDebug() << message;
    }
}

